Optimal. Leaf size=38 \[ -a^2 x+\frac {2 a^4 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2749, 2759, 8}
\begin {gather*} \frac {2 a^4 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )}-a^2 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2749
Rule 2759
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+a \sin (c+d x))^2 \, dx &=a^4 \int \frac {\cos ^2(c+d x)}{(a-a \sin (c+d x))^2} \, dx\\ &=\frac {2 a^4 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )}-a^2 \int 1 \, dx\\ &=-a^2 x+\frac {2 a^4 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 75, normalized size = 1.97 \begin {gather*} \frac {2 a^2 \sec (c+d x) \sqrt {1+\sin (c+d x)} \left (\sin ^{-1}\left (\frac {\sqrt {1-\sin (c+d x)}}{\sqrt {2}}\right ) \sqrt {1-\sin (c+d x)}+\sqrt {1+\sin (c+d x)}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 47, normalized size = 1.24
method | result | size |
risch | \(-a^{2} x +\frac {4 a^{2}}{d \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\) | \(30\) |
derivativedivides | \(\frac {a^{2} \left (\tan \left (d x +c \right )-d x -c \right )+\frac {2 a^{2}}{\cos \left (d x +c \right )}+a^{2} \tan \left (d x +c \right )}{d}\) | \(47\) |
default | \(\frac {a^{2} \left (\tan \left (d x +c \right )-d x -c \right )+\frac {2 a^{2}}{\cos \left (d x +c \right )}+a^{2} \tan \left (d x +c \right )}{d}\) | \(47\) |
norman | \(\frac {a^{2} x +a^{2} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4 a^{2} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {8 a^{2}}{d}-\frac {4 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {8 a^{2} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a^{2} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-a^{2} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a^{2} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {12 a^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}\) | \(189\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 47, normalized size = 1.24 \begin {gather*} -\frac {{\left (d x + c - \tan \left (d x + c\right )\right )} a^{2} - a^{2} \tan \left (d x + c\right ) - \frac {2 \, a^{2}}{\cos \left (d x + c\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 74, normalized size = 1.95 \begin {gather*} -\frac {a^{2} d x - 2 \, a^{2} + {\left (a^{2} d x - 2 \, a^{2}\right )} \cos \left (d x + c\right ) - {\left (a^{2} d x + 2 \, a^{2}\right )} \sin \left (d x + c\right )}{d \cos \left (d x + c\right ) - d \sin \left (d x + c\right ) + d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{2} \left (\int 2 \sin {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sec ^{2}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.84, size = 33, normalized size = 0.87 \begin {gather*} -\frac {{\left (d x + c\right )} a^{2} + \frac {4 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.56, size = 28, normalized size = 0.74 \begin {gather*} -a^2\,x-\frac {4\,a^2}{d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________